<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <form action="" method="POST" id="rowForm">
            <table id="tb" width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
            <tr><td>&nbsp;</td><td><font size = '3' color='red'><img src="images/!.gif">&nbsp;注意：折扣商城活动正进行到第<?= $targetday ?>轮</font></td></tr>
            	<tr><td><?= translate('ACTIVITY_DISCOUNTSHOP_SUBID') ?>:</td><td><?= $row['subid'] ?></td></tr>
                <tr><td><?= translate('ACTIVITY_DISCOUNTSHOP_DAY') ?>:</td><td><?= $row['day'] ?></td></tr>
                <tr><td><?= translate('ACTIVITY_DISCOUNTSHOP_SHELFID') ?>:</td><td><?= $row['shelfid'] ?></td></tr>
                <tr><td><?= translate('ACTIVITY_DISCOUNTSHOP_COSTID') ?>:</td><td><?= $costtype?></td></tr>
                <tr><td><?= translate('ACTIVITY_DISCOUNTSHOP_PRICE') ?>:</td><td><input type="text" name="row[price]" id="price" value="<?= $row['price'] ?>" size="10" /></td></tr>
                <tr><td><?= translate('ACTIVITY_DISCOUNTSHOP_DISCOUNT') ?>:</td><td><input type="text" name="row[discount]" id="discount" value="<?= $row['discount'] ?>" size="10" /><font color='red'><img src="images/!.gif">&nbsp;注：分母为10000,此处填分子</font></td></tr>
                <tr><td><?= translate('ACTIVITY_DISCOUNTSHOP_GIFTID') ?>:</td><td><input type="text" name="row[giftid]" id="giftid" value="<?= $row['giftid'] ?>" size="25" /></td></tr>
                <tr><td><?= translate('ACTIVITY_DISCOUNTSHOP_MAXCOUNT') ?>:</td><td><input type="text" name="row[maxcount]" id="maxcount" value="<?= $row['maxcount']?>" size="10" /></td></tr>
          <!--  <tr><td><?= translate('CDKEY_GIFTBAG_DESCRIBE') ?>:</td><td><textarea name="row[describe]" id="describe" cols="50" rows="5"></textarea></td></tr>  -->
                <tr><td></td><td><input type="submit" value="<?= translate('SUBMIT') ?>" id="submit"/> <input type="reset" value="<?= translate('RESET') ?>" id="reset"/></td></tr>
            </table>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                $("#day").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#shelfid").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#price").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#discount").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#giftid").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#maxcount").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#costtype").formValidator({empty: false, onshow: '<?= translate('PLASE_SELECT') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                //$("#num0").formValidator({empty: false, defaultvalue: '<?= translate('AREA_FORM_INPUT_OPENTIME') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
            });
        </script>
    </body>
</html>
